package com.zengqingfa.thread.demo1;

/**
 * @fileName: CreateThread
 * @author: zengqf3
 * @date: 2020-10-7 11:24
 * @description:
 */
public class CreateThread1 extends Thread {

    @Override
    public void run() {
        for (int i = 0; i < 50; i++) {
            System.out.println(Thread.currentThread().getName() + " i am coding " + i);
        }
    }

    public static void main(String[] args) {
        CreateThread1 createThread1 = new CreateThread1();
        //开启一个线程
        createThread1.start();
        //主线程
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() + " i am study muti-thread  " + i);
        }
    }
}
